
function html_processing() {
	html = '';
	
	html += '<div id="popup" style="cursor: wait;">';
	html += '	<div class="popupLoading" align="center">';
	html += '		<p>Processing...</p><br />';
	html += '		<img src="images/interface/loading.gif" width="49" height="16" alt=""><br />';
	html += '	</div>';
	html += '</div>';	
	
	return html;
}

function html_loading() {
	html = '';
	
	html += '<div id="popup" style="cursor: wait;">';
	html += '	<div class="popupLoading" align="center">';
	html += '		<p>Loading...</p><br />';
	html += '		<img src="images/interface/loading.gif" width="49" height="16" alt=""><br />';
	html += '	</div>';
	html += '</div>';

	return html;
}

function html_unloading() {
	html = '';
	
	html += '<div id="popup" style="cursor: wait;">';
	html += '	<div class="popupLoading" align="center">';
	html += '		<p>One Moment...</p><br />';
	html += '		<img src="images/interface/loading.gif" width="49" height="16" alt=""><br />';
	html += '	</div>';
	html += '</div>';	
	
	return html;
}

function html_help() {
	html = '';
	
	if (window.innerHeight) {
		var clientHeight = window.innerHeight;
		var clientWidth = window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		var clientHeight = document.documentElement.clientHeight;
		var clientWidth = document.documentElement.clientWidth;
	} else if (document.body) {
		var clientHeight = document.body.clientHeight;
		var clientWidth = document.body.clientWidth;
	}
  
	html += '   <div id="popup" class="popup" style="width: ' + Math.min(979, clientWidth) + 'px">    <div class="buttonXContainer"><a href="#x" class="buttonX" onclick="purgeDiv(); return false;">x<div class="buttonLine"></div></a></div>     <div class="popupContent">      <h1>Help</h1>      <div style="float: right; position: relative; top: -22px;"><img src="images/interface/button-help-norm.jpg" width="20" height="20" alt=""></div>      <div class="line"></div>      <table cellpadding="0" cellspacing="0" border="0" style="padding-top: 0px; padding-bottom: 0px;">      <tr>          <td style="background: #E8ECED"><div id="helpSearchDiv" style="width: 220px; min-width: 200px; height: ' + (Math.min(434, clientHeight) - 150) + 'px; overflow: auto"><p style="padding-left: 15px;">Loading...</p></div></td>          <td><div id="helpTopicDiv" style="height: ' + (Math.min(434, clientHeight) - 150) + 'px; overflow: auto"><p style="padding-left: 15px;">Loading...</p></div></td>      </tr>      </table>      <div class="line"></div>      <div class="buttonGridContainer"><a href="#" onclick="purgeDiv(); return false;" class="buttonNorm">Close</a></div>     </div>   </div>  ';
	
	return html;
}

function html_contact(content) {
	html = '';
	
	if (window.innerHeight) {
		var clientHeight = window.innerHeight;
		var clientWidth = window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		var clientHeight = document.documentElement.clientHeight;
		var clientWidth = document.documentElement.clientWidth;
	} else if (document.body) {
		var clientHeight = document.body.clientHeight;
		var clientWidth = document.body.clientWidth;
	}
  
	html += '   <div id="popup" class="popup" style="width: 300px">    <div class="buttonXContainer"><a href="#x" class="buttonX" onclick="closeDiv(); return false;">x<div class="buttonLine"></div></a></div>     <div class="popupContent">      <h1>Contact Vinebid</h1>      <div class="line"></div>      <div style="max-height: ' + (clientHeight - 200) + 'px; padding-top: 20px;">' + content + '</div>     </div>   </div>  ';
	
	return html;
}

function html_calendar(content) {
	html = '';
	
	if (window.innerHeight)
		var clientHeight = window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight)
		var clientHeight = document.documentElement.clientHeight;
	else if (document.body)
		var clientHeight = document.body.clientHeight;
	
	html += '<div id="popup">';
	html += '	<div class="buttonXContainer" style="top: 40px;"><a href="#x" class="buttonX" onclick="closeDiv(); return false;">x<div class="buttonLine"></div></a></div>';
	html += '	<div class="popupContent">';
	html += '		<h1>Choose a Date</h1>';
	html += '		<div class="line"></div>';
	html += '			' + content + '';
	html += '		<div class="line"></div>';
	html += '	</div>';
	html += '</div>';

	return html;
}

function html_processing_message(heading, message, width) {
	html = '';
	
	if (window.innerHeight)
		var clientHeight = window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight)
		var clientHeight = document.documentElement.clientHeight;
	else if (document.body)
		var clientHeight = document.body.clientHeight;
	
	html += '		<div id="popup" class="popup" style="width: ' + width + '">';
	html += '				<div class="popupContent">';
	html += '					<h1>' + heading + '</h1>';
	html += '					<div class="line"></div>';
	html += '					<p style="padding: 0px; margin: 0px; margin-top: 15px; margin-bottom: 15px; max-height: ' + (clientHeight - 200) + 'px; overflow: auto">' + message + '</p>';
	html += '					<div class="line"></div>';
	html += '				</div>';
	html += '		</div>';

	return html;
}

function html_message(heading, message, width) {
	html = '';
	
	if (window.innerHeight)
		var clientHeight = window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight)
		var clientHeight = document.documentElement.clientHeight;
	else if (document.body)
		var clientHeight = document.body.clientHeight;
	
	html += '		<div id="popup" class="popup" style="width: ' + width + '">';
	html += '			<div class="buttonXContainer"><a href="#x" class="buttonX" onclick="purgeDiv(); return false;">x<div class="buttonLine"></div></a></div>';
	html += '				<div class="popupContent">';
	html += '					<h1>' + heading + '</h1>';
	html += '					<div class="line"></div>';
	html += '					<div class="messageText" style="max-height: ' + (clientHeight - 200) + 'px">' + message + '</div>';
	html += '					<div class="line"></div>';
	html += '					<div class="buttonGridContainer"><a href="#" onclick="purgeDiv(); return false;" id="' + divStack[divStack.length - 1] + '_focus" class="buttonNorm">Close</a></div>';
	html += '				</div>';
	html += '		</div>';

	return html;
}

function html_alert(message, ok) {
	html = '';

	html += '		<div id="popup" class="popup" style="width: 350px">';
	html += '			<div class="buttonXContainer"><a href="#x" class="buttonX" onclick="' + ok + '; return false;">x<div class="buttonLine"></div></a></div>';
	html += '				<div class="popupContent">';
	html += '					<h1>Notice</h1>';
	html += '					<div class="line"></div>';
	html += '					<p>' + message + '</p>';
	html += '					<div class="buttonGridContainer"><a href="#" onclick="' + ok + '; return false;" id="' + newestDiv.id + '_focus" class="buttonNorm">OK</a></div>';
	html += '				</div>';
	html += '		</div>';

	return html;
}

function html_information(heading, message, ok) {
	html = '';
	
	if (heading == '')
		heading = 'Information';

	html += '		<div id="popup" class="popup" style="width: 350px">';
	html += '			<div class="buttonXContainer"><a href="#x" class="buttonX" onclick="' + ok + '; return false;">x<div class="buttonLine"></div></a></div>';
	html += '				<div class="popupContent">';
	html += '					<h1>' + heading + '</h1>';
	html += '					<div class="line"></div>';
	html += '					<p>' + message + '</p>';
	html += '					<div class="buttonGridContainer"><a href="#" onclick="' + ok + '; return false;" id="' + newestDiv.id + '_focus" class="buttonNorm">OK</a></div>';
	html += '				</div>';
	html += '		</div>';

	return html;
}

function html_choice(message, yes, no, cancel) {
	html = '';

	html += '		<div id="popup" class="popup" style="width: 350px">';
	html += '			<div class="buttonXContainer"><a href="#x" class="buttonX" onclick="closeDiv(); return false;">x<div class="buttonLine"></div></a></div>';
	html += '				<div class="popupContent">';
	html += '					<h1>Please Confirm</h1>';
	html += '					<div class="line"></div>';
	html += '					<p>' + message + '</p>';
	
	if (yes)	html += '		<div class="buttonGridContainer"><a href="#" onclick="' + yes + '; return false;" id="' + newestDiv.id + '_focus" class="buttonNorm">Yes</a></div>';
	if (no)		html += '		<div class="buttonGridContainer"><a href="#" onclick="' + no + '; return false;" class="buttonNorm">No</a></div>';
	if (cancel)	html += '		<div class="buttonGridContainer"><a href="#" onclick="' + cancel + '; return false;" class="buttonNorm">Cancel</a></div>';
	
	html += '				</div>';
	html += '		</div>';
	
	return html;
}

function html_confirm(message, ok, cancel) {
	html = '';

	html += '		<div id="popup" class="popup" style="width: 350px">';
	html += '			<div class="buttonXContainer"><a href="#x" class="buttonX" onclick="closeDiv(); return false;">x<div class="buttonLine"></div></a></div>';
	html += '				<div class="popupContent">';
	html += '					<h1>Please Note</h1>';
	html += '					<div class="line"></div>';
	html += '					<p>' + message + '</p>';
	
	html += '		<div class="buttonGridContainer"><a href="#" onclick="' + ok + '; return false;" class="buttonNorm">OK</a></div>';
	html += '		<div class="buttonGridContainer"><a href="#" onclick="' + cancel + '; return false;" class="buttonNorm">Cancel</a></div>';
	
	html += '				</div>';
	html += '		</div>';
	
	return html;
}

function html_splash(message, ok) {
	html = '';
	
	if (window.innerHeight)
		var clientHeight = window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight)
		var clientHeight = document.documentElement.clientHeight;
	else if (document.body)
		var clientHeight = document.body.clientHeight;	
	
	html += '		<div id="popup" class="popup" style="width: 665px;">';
	html += '			<div class="buttonXContainer"><a href="#x" class="buttonX" onclick="' + ok + '; return false;">x<div class="buttonLine"></div></a></div>';
	html += '				<div class="popupContent">';
	html += '<!--					<div style="width: 361px; margin: 0 auto;"><img src="images/interface/banner-welcome-new.jpg" width="361" height="121"></div><br /> -->';	
	html += '					<img src="images/interface/heading-welcome.jpg" width="258" height="22" style="padding-bottom: 3px;"><br />';
	html += '					<p>' + message + '</p>';
	html += '					<div class="buttonGridContainer"><a href="#" onclick="' + ok + '; return false;" id="' + newestDiv.id + '_focus" class="buttonNorm">OK</a></div>';
	html += '				</div>';
	html += '		</div>';

	return html;
}

